<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<script type="text/javascript">
/**
 * Get the HTML form.
 * @param namespace
 * @param frmName
 * @return
 */
function getForm(namespace, frmName) {
	return document.forms[namespace + frmName];
}

/**
 * Submit the form.
 * @param namespace
 * @param frmName
 * @param eventId
 * @return
 */
function submitAction(namespace, frmName, eventId, reviewerId) {
	var frm = getForm(namespace, frmName);
	frm.eventId.value = eventId;
	frm.reviewerId = reviewerId;
	frm.submit();
}

</script>
<portlet:defineObjects />


<form action="<portlet:actionURL/>" name="<portlet:namespace/>ReviewerDetail" method="post">
<input name="eventId" type="hidden" />
<input name="reviewerId" type="hidden"/>
<input name="screenId" type="hidden" value="reviewerdetail"/>
<input name="dictId" type="hidden" value="${result.dictId }"/>
<table style="width:100%;background:#FF9">
<tr>
			<td colspan="3" style="width:100%;height:50px;background:#0F3">
            Hello ${sessionScope.username}
            <div style="float:right"><input type="submit" value="Home" onclick='submitAction("<portlet:namespace/>", "ReviewerDetail", "home", "0");'/></div>
            <div style="float:right"><input type="submit" value="Logout" onclick='submitAction("<portlet:namespace/>", "ReviewerDetail", "logout", "0");'/></div>
            </td>
      	</tr>
<tr>
	<td colspan="3" align="center"><font color="#0000FF" size="+5">Reviewer Detail</font></td>
</tr>
<tr>
	<td colspan="3" align="left">${result.dictName }</td>
</tr>
<c:forEach var="item" items="${result.listReviewer }">
  <tr>
    <td width="3%"><input type="checkbox" value="${item.id }"  name="userId"/></td>
    <td width="37%">${item.username }</td>
    <td width="60%">
    	<input type="submit" value="Delete" onclick='submitAction("<portlet:namespace/>", "ReviewerDetail", "delete", "${item.id }");'/>
  	</td>
  </tr>
</c:forEach>
<tr>
	<td colspan="3">
		<input type="submit" value="Delete" onclick='submitAction("<portlet:namespace/>", "ReviewerDetail", "deletelist", "${item.id }");'/>
    	<input type="submit" value="Back" onclick='submitAction("<portlet:namespace/>", "ReviewerDetail", "back", "${item.id }");'/>
    </td>
</tr>
</table>
</form>